<?php
namespace app\model;
use think\Model;
use think\model\concern\SoftDelete;

class Role extends Model{
    protected $autoWriteTimestamp = true;
    use SoftDelete;

    public function user(){
        return $this->belongsToMany(Admin::class,RoleUser::class,'user_id','role_id');
    }
}